import { NgModule, Optional, SkipSelf } from '@angular/core';
import { TokenService } from './service/token.service';
import { LoginService } from './service/login.service';
import { MockTestService } from './service/mock-test.service';

@NgModule({
  providers: [
    TokenService,
    LoginService,
    MockTestService,
  ]
})
export class CoreModule {
  constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
    if (parentModule) {
        throw new Error(
            'CoreModule is already loaded. Import it in the AppModule only');
    }
  }
}
